#ifndef NUMBER_H_
#define NUMBER_H_


#include "Fraction.h"

typedef long double Real;
typedef struct{
	enum NumberType{FRACTION, REAL} type;
	Fraction fraction;
	Real real;
}Number;

void numbercpy(Number * dest, const Number * src);
void inttonum(Number * dest, const int src);
void linttonum(Number * dest, const long long int src);
void doubletonum(Number * dest, const double src);
void ldoubletonum(Number * dest, const long double src);
int numbercmp(const Number * first, const Number * second);
void numberplus(Number * dest, const Number * first, const Number * second);
void numberminus(Number * dest, const Number * first, const Number * second);
void numbermul(Number * dest, const Number * first, const Number * second);
void numberdiv(Number * dest, const Number * first, const Number * second);
void numberpow(Number * dest, const Number * first, const Number * second);
void numberopp(Number * dest, const Number * src);
void numberinv(Number * dest, const Number * src);

void numbersin(Number * dest, const Number * src);
void numbercos(Number * dest, const Number * src);
void numbertan(Number * dest, const Number * src);
void numberln(Number * dest, const Number * src);

int number_is_int(const Number * number);
long double numtodouble(const Number * number);
Number * construct_number();
char * numtostr(Number * number);

#endif /*NUMBER_H_*/
